package com.hmall.trade.amqp;
/*
  Date: 2023/11/29
  Author: Luochao
  Description:
*/

import lombok.RequiredArgsConstructor;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.stereotype.Component;

import java.util.Collection;

@Component
@RequiredArgsConstructor
public class CartQueues {
    private final RabbitTemplate rabbitTemplate;
    private final String exchangeName = "hmall.cart";

    public void removeByItemIds(Collection<Long> itemIds) {
        rabbitTemplate.convertAndSend(exchangeName, "removeByItemIds", itemIds);
    }
}
